package com.example.template.dto;

import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.List;

/**
 * @className: RoleDTO
 * @description: TODO 类描述
 * @author: Kuangkeli
 * @date: 2024/02/21 10:19
 **/
@Data
public class RoleDTO implements Serializable {

    private Long roleId;

    @NotNull(message = "角色名称不能为空")
    @Length(min = 2, max = 10, message = "角色名称必须为2-10个字符")
    private String roleName;

    @NotNull(message = "权限字符不能为空")
    @Length(min = 2, max = 10, message = "权限字符必须为2-10个字符")
    private String roleKey;

    @NotNull(message = "排序顺序不能为空")
    private Integer roleSort;

    @NotNull(message = "角色状态不能为空")
    private String status;

    @NotNull(message = "角色备注不能为空")
    @Length(min = 1, max = 20,message = "备注不能为空")
    private String remark;

    private List<Long> perms;
}
